/**
 * 
 */
package com.myBase.core.dao;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.myBase.core.entity.GoldCoinForUserVo;
import com.myBase.core.entity.Goldcoin;
import com.myBase.core.entity.GoldcoinRelateRules;
import com.myBase.core.entity.GoldcoinWapper;
import com.myBase.common.persistence.CrudDao;
import com.myBase.common.persistence.annotation.MyBatisDao;

/**
 * 金币录入DAO接口
 * @author 金币录入
 * @version 2017-05-15
 */
@MyBatisDao
public interface GoldcoinDao extends CrudDao<Goldcoin> {
    public int ifOnlymark(String goldcoinmark);

    public List<GoldcoinWapper> findGoldCoinPage(GoldcoinWapper goldcoinWapper);

    public GoldcoinWapper getGoinDetail(String goldcoinid);

    public List<GoldcoinWapper> getNoDistribution(GoldcoinWapper goldcoinWapper);

    public Goldcoin getGoinDetailedit(String goldcoinid);

    /**
     * * findCode(查询机构编码) 
     */
    public String findCode(String userId);

    public int checkGoldCoin(@Param("id") String id, @Param("userId") String userId, @Param("date") Date date);

    public int checkBackGoldCoin(@Param("id") String id, @Param("userId") String userId, @Param("date") Date date);

    public List<Goldcoin> goldCoinDistributeList(String branchid);

    public Integer goldCoinSumAjax(@Param("goldCoinActivity") String goldCoinActivity,
            @Param("branchId") String branchId);

    public Integer goldCoinUpdate(Goldcoin goldcoin);

    public ArrayList<Goldcoin> getGoldCoinNeedSettlement();

    public Integer updateStstus(@Param("id") Integer id, @Param("subchannel") String subChannel);

    // 更新状态
    public Integer updateStatus(@Param("status") String status, @Param("id") Integer id);

    // 更新状态金币结算
    public Integer updateStatusForSettlement(@Param("id") Integer id);

    public List<GoldcoinWapper> getDistribution(GoldcoinWapper goldcoinWapper);

    public GoldcoinRelateRules getGoldcoinRelateRulesForAndGold(@Param("goldcoinId") int goldcoinId,
            @Param("ruleId") int ruleId);

    public int goldCoinCancel(@Param("id") String id);

    public List<GoldCoinForUserVo> goldcoinforusers(GoldCoinForUserVo goldCoinForUserVo2);

    public int onlyUserCorn(String id);

    public int updateBySelf(Goldcoin goldcoin);
}